/*
 * Copyright 2003 ISS.
 * The contents contained in this document may not be reproduced in any
 * form or by any means, without the written permission of ISS, other
 * than for the purpose for which it has been supplied.
 *
 */
package sg.edu.nus.iss.vmcs.bridge;

import sg.edu.nus.iss.vmcs.store.CashStore;
import sg.edu.nus.iss.vmcs.store.CashStoreItem;
import sg.edu.nus.iss.vmcs.store.Coin;
import sg.edu.nus.iss.vmcs.store.DrinksBrand;
import sg.edu.nus.iss.vmcs.store.DrinksStore;
import sg.edu.nus.iss.vmcs.store.DrinksStoreItem;
import sg.edu.nus.iss.vmcs.store.Store;
import sg.edu.nus.iss.vmcs.store.StoreController;
import sg.edu.nus.iss.vmcs.store.StoreItem;
import sg.edu.nus.iss.vmcs.store.StoreObject;

/**
 * This interface provides the generic functionality required to initialize the stores.
 * 
 * @see CashStore
 * @see CashStoreItem
 * @see Coin
 * @see DrinksBrand
 * @see DrinksStore
 * @see DrinksStoreItem
 * @see Store
 * @see StoreController
 * @see StoreItem
 * @see StoreObject
 * 
 * @version 3.0 5/07/2003
 * @author Olivo Miotto, Pang Ping Li
 */
public abstract class PropertyLoaderImpl implements PropertyLoader {

	private PropertyLoaderImplementor propertyLoaderImplementor;

	public PropertyLoaderImpl(PropertyLoaderImplementor propertyLoaderImplementor) {
		this.propertyLoaderImplementor = propertyLoaderImplementor;
	}

	@Override
	public void initialize() throws Exception {
		propertyLoaderImplementor.initialize();
	}

	@Override
	public void saveProperty() throws Exception {
		propertyLoaderImplementor.saveProperty();
	}

	@Override
	public int getNumOfItems() {
		return propertyLoaderImplementor.getNumOfItems();
	}

	@Override
	public void setNumOfItems(int numItems) {
		propertyLoaderImplementor.setNumOfItems(numItems);
	}

	@Override
	public abstract StoreItem getItem (int index);

	@Override
	public abstract void setItem (int index, StoreItem item);

	@Override
	public String getValue(String key) {
		return propertyLoaderImplementor.getProperty(key);
	}

	@Override
	public void setValue(String key, String value) {
		propertyLoaderImplementor.setProperty(key, value);
	}

}//End of interface PropertyLoader
